package com.stormrage.entity.exam;

import java.io.Serializable;

public class ExmStudentAnswer implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = 7046321398475970886L;

	// ------------------------------- Fields -------------------------------

	private Integer id;

	private Integer stuExamId;

	private String answer;

	private Integer correct;

	// ------------------------------- Fields -------------------------------

	public ExmStudentAnswer() {
	}

	// ------------------------------- Fields -------------------------------

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getStuExamId() {
		return stuExamId;
	}

	public void setStuExamId(Integer stuExamId) {
		this.stuExamId = stuExamId;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public Integer getCorrect() {
		return correct;
	}

	public void setCorrect(Integer correct) {
		this.correct = correct;
	}

	// ------------------------------- Fields -------------------------------

	public static ExmStudentAnswer instance(Integer stuExamId, String answer, Integer correct) {
		ExmStudentAnswer entity = new ExmStudentAnswer();
		entity.setStuExamId(stuExamId);
		entity.setAnswer(answer);
		entity.setCorrect(correct);
		return entity;
	}

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " answer - " + answer + " stuExamId - " + stuExamId + " correct - "
				+ correct;
	}

}
